From dd28e22aa147d4763ebdf5504a54183e641c8a4d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Wed, 13 Apr 2011 22:46:18 +0100 Subject: [PATCH] Move documentation to inline comments: GtkIconFactory --- docs/reference/gtk/tmpl/.gitignore | 1 + docs/reference/gtk/tmpl/gtkiconfactory.sgml | 542 -------------------- gtk/gtkiconfactory.c | 101 ++++ 3 files changed, 102 insertions(+), 542 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkiconfactory.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index b2e1e758e9..6ad4cb70bd 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -52,6 +52,7 @@ gtkhpaned.sgml gtkhscale.sgml gtkhscrollbar.sgml gtkhseparator.sgml +gtkiconfactory.sgml gtkiconview.sgml gtkimagemenuitem.sgml gtkimcontext.sgml diff --git a/docs/reference/gtk/tmpl/gtkiconfactory.sgml b/docs/reference/gtk/tmpl/gtkiconfactory.sgml deleted file mode 100644 index b5e3a3e1e5..0000000000 --- a/docs/reference/gtk/tmpl/gtkiconfactory.sgml +++ /dev/null @@ -1,542 +0,0 @@ - -Themeable Stock Images - - - -Manipulating stock icons - - - - - -Browse the available stock icons in the list of stock IDs found here. You can also use -the gtk-demo application for this purpose. - - - - An icon factory manages a collection of #GtkIconSet; a #GtkIconSet manages a - set of variants of a particular icon (i.e. a #GtkIconSet contains variants for - different sizes and widget states). Icons in an icon factory are named by a - stock ID, which is a simple string identifying the icon. Each #GtkStyle has a - list of #GtkIconFactory derived from the current theme; those icon factories - are consulted first when searching for an icon. If the theme doesn't set a - particular icon, GTK+ looks for the icon in a list of default icon factories, - maintained by gtk_icon_factory_add_default() and - gtk_icon_factory_remove_default(). Applications with icons should add a default - icon factory with their icons, which will allow themes to override the icons - for the application. - - - -To display an icon, always use gtk_style_lookup_icon_set() on the widget that -will display the icon, or the convenience function -gtk_widget_render_icon(). These functions take the theme into account when -looking up the icon to use for a given stock ID. - - -GtkIconFactory as GtkBuildable - -GtkIconFactory supports a custom <sources> element, which -can contain multiple <source> elements. -The following attributes are allowed: - - - -stock-id -The stock id of the source, a string. -This attribute is mandatory - - - -filename -The filename of the source, a string. -This attribute is optional - - - - -icon-name -The icon name for the source, a string. -This attribute is optional. - - - - -size -Size of the icon, a #GtkIconSize enum value. -This attribute is optional. - - - - -direction -Direction of the source, a #GtkTextDirection enum value. -This attribute is optional. - - - - -state -State of the source, a #GtkStateType enum value. -This attribute is optional. - - - - - - - -A <structname>GtkIconFactory</structname> UI definition fragment. - - - - - - - - - apple-red - True - - - -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@GTK_ICON_SIZE_INVALID: -@GTK_ICON_SIZE_MENU: -@GTK_ICON_SIZE_SMALL_TOOLBAR: -@GTK_ICON_SIZE_LARGE_TOOLBAR: -@GTK_ICON_SIZE_BUTTON: -@GTK_ICON_SIZE_DND: -@GTK_ICON_SIZE_DIALOG: - - - - - - -@source: -@Returns: - - - - - - - -@source: - - - - - - - -@factory: -@stock_id: -@icon_set: - - - - - - - -@factory: - - - - - - - -@factory: -@stock_id: -@Returns: - - - - - - - -@stock_id: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@factory: - - - - - - - -@icon_set: -@source: - - - - - - - -@icon_set: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@icon_set: -@Returns: - - - - - - - -@icon_set: -@style: -@direction: -@state: -@size: -@widget: -@detail: -@Returns: - - - - - - - -@icon_set: -@context: -@size: -@Returns: - - - - - - - -@icon_set: - - - - - - - -@size: -@width: -@height: -@Returns: - - - - - - - -@settings: -@size: -@width: -@height: -@Returns: - - - - - - - -@name: -@width: -@height: -@Returns: - - - - - - - -@alias: -@target: - - - - - - - -@name: -@Returns: - - - - - - - -@size: -@Returns: - - - - - - - -@icon_set: -@sizes: -@n_sizes: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@source: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@source: -@direction: - - - - - - - -@source: -@setting: - - - - - - - -@source: -@filename: - - - - - - - -@source: -@pixbuf: - - - - - - - -@source: -@icon_name: - - - - - - - -@source: -@size: - - - - - - - -@source: -@setting: - - - - - - - -@source: -@state: - - - - - - - -@source: -@setting: - - diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index 4e16bfbf37..4feff1087f 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -42,6 +42,107 @@ #include "gtkbuilderprivate.h" #include "gtktypebuiltins.h" + +/** + * SECTION:gtkiconfactory + * @Short_description: Manipulating stock icons + * @Title: Themeable Stock Images + * + * Browse the available stock icons in the list of stock IDs found here. You can also use + * the gtk-demo application for this purpose. + * + * An icon factory manages a collection of #GtkIconSet; a #GtkIconSet manages a + * set of variants of a particular icon (i.e. a #GtkIconSet contains variants for + * different sizes and widget states). Icons in an icon factory are named by a + * stock ID, which is a simple string identifying the icon. Each #GtkStyle has a + * list of #GtkIconFactory derived from the current theme; those icon factories + * are consulted first when searching for an icon. If the theme doesn't set a + * particular icon, GTK+ looks for the icon in a list of default icon factories, + * maintained by gtk_icon_factory_add_default() and + * gtk_icon_factory_remove_default(). Applications with icons should add a default + * icon factory with their icons, which will allow themes to override the icons + * for the application. + * + * To display an icon, always use gtk_style_lookup_icon_set() on the widget that + * will display the icon, or the convenience function + * gtk_widget_render_icon(). These functions take the theme into account when + * looking up the icon to use for a given stock ID. + * + * + * GtkIconFactory as GtkBuildable + * + * GtkIconFactory supports a custom <sources> element, which can contain + * multiple <source> elements. + * The following attributes are allowed: + * + * + * stock-id + * + * The stock id of the source, a string. + * This attribute is mandatory + * + * + * + * filename + * + * The filename of the source, a string. + * This attribute is optional + * + * + * + * icon-name + * + * The icon name for the source, a string. + * This attribute is optional. + * + * + * + * size + * + * Size of the icon, a #GtkIconSize enum value. + * This attribute is optional. + * + * + * + * direction + * + * Direction of the source, a #GtkTextDirection enum value. + * This attribute is optional. + * + * + * + * state + * + * State of the source, a #GtkStateType enum value. + * This attribute is optional. + * + * + * + * + * A #GtkIconFactory UI definition fragment. + * + * + * + * + * + * + * + * + * apple-red + * True + * + * + * + * ]]> + * + * + * + * + */ + + static GSList *all_icon_factories = NULL; struct _GtkIconFactoryPrivate -- 2.30.2